Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 4 - Advanced Printing Features / Advanced Printing Features Reference
Application-Defined Functions


Looping Through a Printer's View Devices

The application-defined function called by the GXForEachPrinterViewDeviceDo function takes two parameters: the view device object associated with a particular printer object, and a pointer to a reference constant in which you specify data passed into the application-defined function. For example, this is how you should declare the application-function if you were to name it MyViewDeviceFunction:

gxLoopStatus MyViewDeviceFunction(gxViewDevice aViewDevice, 
                                 void *refCon);
aViewDevice

A reference to the current view device. This is provided by QuickDraw GX when the MyViewDeviceFunction function is called.
refCon
A pointer to a reference constant.
function result
A Boolean to indicate whether looping should stop.
DESCRIPTION
When you use the GXForEachPrinterViewDeviceDo function, QuickDraw GX calls the application-defined function for each view device object referenced by the specified printer object until the application-defined function returns gxStopLooping or there are no more view devices in the list. If you want the GXForEachPrinterViewDeviceDo function to continue with the next view device, return gxKeepLooping from the application-defined function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help